-
Notifications
You must be signed in to change notification settings - Fork 38.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
controller: set unavailableReplicas correctly when scaling down #41740
controller: set unavailableReplicas correctly when scaling down #41740
Conversation
deployment_controller.go:299] Error syncing deployment e2e-tests-kubectl-2l7xx/e2e-test-nginx-deployment: Deployment.extensions "e2e-test-nginx-deployment" is invalid: status.unavailableReplicas: Invalid value: -1: must be greater than or equal to 0 The validation error above occurs usually when a Deployment is scaled down. In such a case we should default unavailableReplicas to 0 instead of making an invalid api call.
[APPROVALNOTIFIER] This PR is APPROVED The following people have approved this PR: kargakis Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
LGTM |
Automatic merge from submit-queue |
Commit found in the "release-1.5" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this is an error find help to get your PR picked. |
Cherry-pick #38299 back to 1.5 - easy fix and the bug can drop Deployments out of the controller queue so seems like it's worth being cherry-picked.
@janetkuo @saad-ali